/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.modules.iim.service;

import com.easy.core.persistence.Page;
import com.easy.core.service.BaseService;
import com.easy.modules.iim.entity.ChatHistory;
import com.easy.modules.iim.entity.ChatPage;

import java.util.Collection;
import java.util.List;

/**
 * 聊天记录Service
 * @author easy
 * @version 2015-12-29
 */
public interface ChatHistoryService extends BaseService {

	public ChatPage<ChatHistory> findPage(ChatPage<ChatHistory> page, ChatHistory entity);

	public ChatPage<ChatHistory> findGroupPage(ChatPage<ChatHistory> page, ChatHistory entity);


	public int findUnReadCount(ChatHistory chatHistory);

	/**
	 * 获取单条数据
	 * @param id
	 * @return
	 */
	public ChatHistory get(String id);

	/**
	 * 获取单条数据
	 * @param entity
	 * @return
	 */
	public ChatHistory get(ChatHistory entity);

	/**
	 * 查询列表数据
	 * @param entity
	 * @return
	 */
	public List<ChatHistory> findList(ChatHistory entity);

	/**
	 * 查询分页数据
	 * @param page 分页对象
	 * @param entity
	 * @return
	 */
	public Page<ChatHistory> findPage(Page<ChatHistory> page, ChatHistory entity);

	/**
	 * 保存数据（插入或更新）
	 * @param entity
	 */
	public void save(ChatHistory entity);

	/**
	 * 删除数据
	 * @param entity
	 */
	public void delete(ChatHistory entity) ;


	/**
	 * 删除全部数据
	 * @param entitys
	 */
	public void deleteAll(Collection<ChatHistory> entitys) ;

	/**
	 * 删除全部数据
	 * @param entitys
	 */
	public void deleteAllByLogic(Collection<ChatHistory> entitys);


	/**
	 * 获取单条数据
	 * @param propertyName, value
	 * @return
	 */
	public ChatHistory findUniqueByProperty(String propertyName, Object value);

	/**
	 * 动态sql
	 * @param sql
	 */

	public List<Object> executeSelectSql(String sql);

	public void executeInsertSql(String sql);

	public void executeUpdateSql(String sql);

	public void executeDeleteSql(String sql);
}